﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ChangePassword.aspx.cs" Inherits="Fish_Atlantis.ChangePassword" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title>亚特兰蒂斯——修改密码界面</title>
    <link href="/Styles/change.css" rel="stylesheet" type="text/css" />
    <script  type="text/javascript">
        function check() {
            var str1 = document.getElementById("Text1").value;
            var str2 = document.getElementById("Text2").value;
            if (str1 == "") {
                alert("请输入旧密码！");
                return false;
            }
            else if (str2 == "") {
               alert("请输入新密码！");
                return false;
             }
            else
            {return true;}
        }
        function go() {

            var i = "<%=type%>";
            if (i == "1")
            { window.location.href = '/CustomerPanel/MainPage.aspx'; }
            else if (i == "2")
            { window.location.href = '/SupplierPanel/MainPage.aspx'; }
            else if (i == "3")
            { window.location.href = '/ProfessorPanel/MainPage.aspx'; }
            else
                window.location.href = '/Default.aspx';
        }
        function go() {

            var i = "<%=type%>";
            if (i == "1")
            { window.location.href = '/CustomerPanel/MainPage.aspx'; }
            else if (i == "2")
            { window.location.href = '/SupplierPanel/MainPage.aspx'; }
            else if (i == "3")
            { window.location.href = '/ProfessorPanel/MainPage.aspx'; }
            else
                window.location.href = '/Default.aspx';
        }
    </script>
</head>
<body background="../Image/86859-106.jpg">
    <div style="padding: 130px 0 0 0;">
        <form id="Form1" runat="server">
        <div id="change-box">
            <div id="reg1" style="margin: 115px 0 0 258px;" class="reg-box-field">
                <input  type="password" id="Text1" onkeydown="notno()" onblur="change1()" class="form-login" placeholder="请输入用户名" maxlength="20"
                    runat="server" />
            </div>
            <div id="reg2" style="margin: 29px 0 0 258px;" class="reg-box-field">
                <input id="Text2" type="password" onkeydown="notno()" onblur="change2()" class="form-login" placeholder="请输入密码" maxlength="20"
                    runat="server" />
            </div>

            <div id="btn" style="margin: 45px 0 0 120px; " class="reg-box2-field">
                <a id="A1" runat="server" onclick="if(!check())return false" onserverclick="btn_sub_Click">
                    <img src="/image/change2.png" 
                    style="margin-left: 37px; height: 38px; width: 111px;" /></a>
                     <a id="A2" href="#" onclick="go()">
                    <img src="/image/change3.png" 
                    style="margin-left: 60px; height: 38px; width: 111px;" /></a>
            </div>
        </div>
        </form>
    </div>
</body>
</html>